home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / mint / mgr / sparcmgr / src.zoo / src / data.c < prev    next >
Encoding:
C/C++ Source or Header  |  1989-09-27  |  3.9 KB  |  148 lines

  1. /*                        Copyright (c) 1987 Bellcore
  2.  *                            All Rights Reserved
  3.  *       Permission is granted to copy or use this program, EXCEPT that it
  4.  *       may not be sold for profit, the copyright notice must be reproduced
  5.  *       on copies, and credit should be given to Bellcore where it is due.
  6.  *       BELLCORE MAKES NO WARRANTY AND ACCEPTS NO LIABILITY FOR THIS PROGRAM.
  7.  */
  8. /*    $Header: data.c,v 1.2 89/09/27 09:27:31 sau Exp $
  9.     $Source: /m1/mgr.new/src/RCS/data.c,v $
  10. */
  11. static char    RCSid_[] = "$Source: /m1/mgr.new/src/RCS/data.c,v $$Revision: 1.2 $";
  12.  
  13. /* static data items for window manager */
  14.  
  15. #include "bitmap.h"
  16. #include "defs.h"
  17. #include "font.h"
  18.  
  19. /* bit maps */
  20.  
  21. #include "icons.h"
  22.  
  23. /* space to store screen covered by mouse */
  24.  
  25. static char c_save[ BIT_Size(16,16,DEPTH) ];
  26.  
  27.  
  28. /* structures for mouse icons  all icons are 32 bits wide
  29.  * even though currently on 16 bits are used.  This way all
  30.  * versions can use 32 bit aligned bitmaps
  31.  */
  32.  
  33. bit_static(pattern,32,4,pat_data,1);
  34. bit_static(mouse_arrow,32,32,c_arrow1,1);
  35. bit_static(mouse_box,32,32,c_box,1);
  36. bit_static(mouse_cut,32,32,c_cut,1);
  37. bit_static(mouse_cup,32,32,c_cup,1);
  38. bit_static(mouse_save,32,16,c_save,DEPTH);
  39. bit_static(mouse_cross,32,16,c_cross,1);
  40. bit_static(mouse_bull,32,8,c_bull,1);
  41. bit_static(mouse_bull2,32,8,c_bull2,1);
  42.  
  43. /* menus */
  44.  
  45. char *active_menu[] = {        /* active-window menu */
  46.    "reshape",
  47.    "move",
  48.    "bury",
  49. #ifdef CUT
  50.    "cut",
  51.    "paste",
  52. #endif
  53.    "- - - -",
  54.    "destroy",
  55.    (char *) 0};
  56.  
  57. char *main_menu[] = {        /* primary menu */
  58.    "new window",
  59.    "redraw",
  60.    "quit",
  61.    (char *) 0};
  62.  
  63. char *full_menu[] = {        /* primary menu  - no more windows allowed */
  64.    "redraw",
  65.    "quit",
  66.    (char *) 0};
  67.  
  68. char *quit_menu[] = {        /* to verify quit */
  69.    "cancel",
  70.    "suspend",
  71.    "- - - -",
  72.    "really quit",
  73.    (char *) 0};
  74.   
  75.  
  76. /* menu functions - these have a 1-1 corrospondance with the menu items */
  77.  
  78. int new_window(), shape_window(), move_window(), destroy_window(), quit();
  79. int redraw(), hide_win(), nothing();
  80. #ifdef CUT
  81. int cut(), paste();
  82. #endif
  83.  
  84. function main_functions[] = {
  85.    new_window,
  86.    redraw,
  87.    quit,
  88.    (function) 0 };
  89.  
  90. function full_functions[] = {
  91.    redraw,
  92.    quit,
  93.    (function) 0 };
  94.  
  95. function active_functions[] = {
  96.    shape_window,
  97.    move_window,
  98.    hide_win,
  99. #ifdef CUT
  100.    cut,
  101.    paste,
  102. #endif
  103.    nothing,
  104.    destroy_window,
  105.    (function) 0 };
  106.  
  107. /* default font info */
  108.  
  109. char *font_dir = FONTDIR;
  110. char *fontlist[MAXFONT];
  111.  
  112. /* default icon info */
  113. char *icon_dir = ICONDIR;
  114.  
  115. /* raster of table for inverted screen (this doesn't belong here) */
  116.  
  117. int rev_ops[] = {
  118.    0xf,0x7,0xb,0x3,0xd,0x5,0x9,0x1,0xe,0x6,0xa,0x2,0xc,0x4,0x8,0x0
  119.    };
  120.  
  121. BITMAP *m_rop;                                /* current mouse bit map */
  122. int next_window=0;                        /* next available window count */
  123. struct font *font;                        /* default font */
  124. BITMAP *screen;                            /* default screen */
  125. WINDOW *active = (WINDOW *) 0;        /* window connected to keyboard */
  126. WINDOW *last_active = (WINDOW *) 0;    /* previous window connected to keyboard */
  127. int button_state = 0;                    /* state of the mouse buttons */
  128. int mouse, mousex, mousey;                /* mouse fd, x-coord, y-coord */
  129. int debug = 0;                                /* ==1 for debug prints */
  130. int mouse_on = 0;                            /* 1 iff mouse track is on */
  131. char *snarf = (char *) 0;                /* place to keep snarfed text */
  132. char *message = (char *) 0;            /* place to keep message */
  133. char *start_command;                        /* command for shell at window start */
  134. char *init_command;                        /* str to send window upon creation */
  135. int id_message = 0;                        /* id of message sender */
  136. short buckey_map = 0;                    /* mapping from ptty to buckey key */
  137. unsigned int init_flags = INIT_FLAGS;    /* initial flags for new windows */
  138. int mask = 0;                                /* process mask for select */
  139. int poll = 0;                                /* processes with non-processed but
  140.                                                  * already read data */
  141. #ifdef DEBUG
  142. char debug_level[] = "                                ";    /* debug flags */
  143. #endif
  144.  
  145. /* aarg! */
  146.  
  147. nothing() {}
  148.